package com.seculab.admin.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.seculab.admin.dao.DefaultDAO;
import com.seculab.admin.domain.User;

@Service
public class LoginServiceImpl implements LoginService {

	private DefaultDAO defaultDAO;
	
	@Autowired
	public void setDefaultDAO(DefaultDAO defaultDAO) {
		this.defaultDAO = defaultDAO;
	}
	
	@Override
	public Map<String, Object> login(User user) throws Exception {
		return (Map<String, Object>)defaultDAO.selectOne("User.checkLogin", user);
	}
	
}
